<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var num;
        var sum = 0;
        for (num = 100; num < 200; num = num + 1) {
            sum = sum + num;
            console.log('num = ' + num + ', sum = ' + sum);
        }
        console.log(sum);
    </script>
</body>

</html>

<!-- 循环的标准 -->
<!-- https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/Building_blocks/Looping_code#%E5%BE%AA%E7%8E%AF%E7%9A%84%E6%A0%87%E5%87%86 -->

<!-- for -->
<!-- https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Statements/for -->
<!-- for...in -->
<!-- https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Statements/for...in -->
<!-- for...of -->
<!-- https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Statements/for...of -->